Visible to issue readers
IDEA-238995 Created by Sofya Byzova 3 years ago Updated by Aleksandr Frolov a week ago
Visible to issue readers
IDEA-238995 Created by Sofya Byzova 3 years ago Updated by Aleksandr Frolov a week ago
Revise IDE folders locking mechanism (don't fail startup if all ports in range are taken, limited network due to firewall/VPN)

Revise IDE folders locking mechanism (don't fail startup if all ports in range are taken, limited network due to firewall/VPN)

PROBLEM 1
If all the 50 ports between 6942 and 6991 are reserved, taken by the other apps or firewall doesn't allow IDE to bind on them, startup fails with the below exception:

WORKAROUND: run the following commands in the Administrator console (cmd.exe):

netsh int ipv4 set dynamicport tcp start=49152 num=16383
netsh int ipv4 set dynamicport udp start=49152 num=16383
C/C++ detected

If the above doesn't help, please try these commands instead:

net stop winnat
net start winnat
C/C++ detected

EXCEPTION:

java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable()
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable()
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run()
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker()
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run()
    at java.base/java.lang.Thread.run()
Caused by: java.net.BindException: Address already in use: bind
    at java.base/sun.nio.ch.Net.bind0()
    at java.base/sun.nio.ch.Net.bind()
    at java.base/sun.nio.ch.Net.bind()
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind()
    at io.netty.channel.socket.nio.NioServerSocketChannel.doBind()
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind()
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind()
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind()
    at io.netty.channel.AbstractChannelHandlerContext.bind()
    at io.netty.channel.DefaultChannelPipeline.bind()
    at io.netty.channel.AbstractChannel.bind()
    at io.netty.bootstrap.AbstractBootstrap$2.run()
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute()
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks()
    at io.netty.channel.nio.NioEventLoop.run()
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run()
    at io.netty.util.internal.ThreadExecutorMap$2.run()
    at io.netty.util.concurrent.FastThreadLocalRunnable.run()
    ... 1 more

-----
JRE 11.0.6+8-b765.25 amd64 by JetBrains s.r.o
C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\jbr
Java stack trace detected

PROBLEM 2
Unable to start the IDE with a network limited due to firewall/VPN: See IDEA-253939 for example.

WORKAROUND
Add -Djava.net.preferIPv4Stack=true to the IDE's .vmoptions file and start the IDE.
Check here to find the .vmoptions file: https://intellij-support.jetbrains.com/hc/en-us/articles/206544869 .

EXCEPTION:

java.util.concurrent.CompletionException: java.lang.IllegalStateException: failed to create a child event loop
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable()
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable()
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run()
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker()
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run()
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run()
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run()
    at java.base/java.security.AccessController.doPrivileged()
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run()
    at java.base/java.lang.Thread.run()
Caused by: java.lang.IllegalStateException: failed to create a child event loop
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>()
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>()
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>()
    at io.netty.channel.MultithreadEventLoopGroup.<init>()
    at io.netty.channel.nio.NioEventLoopGroup.<init>()
    at io.netty.channel.nio.NioEventLoopGroup.<init>()
    at io.netty.channel.nio.NioEventLoopGroup.<init>()
    at org.jetbrains.io.BuiltInServerKt.multiThreadEventLoopGroup()
    at org.jetbrains.io.BuiltInServerKt.access$multiThreadEventLoopGroup()
    at org.jetbrains.io.BuiltInServer$Companion.start()
    at org.jetbrains.io.BuiltInServer.start()
    at com.intellij.idea.SocketLock.lambda$lockAndTryActivate$2()
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run()
    ... 7 more
Caused by: io.netty.channel.ChannelException: failed to open a new selector
    at io.netty.channel.nio.NioEventLoop.openSelector()
    at io.netty.channel.nio.NioEventLoop.<init>()
    at io.netty.channel.nio.NioEventLoopGroup.newChild()
    at io.netty.channel.nio.NioEventLoopGroup.newChild()
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>()
    ... 19 more
Caused by: java.io.IOException: Unable to establish loopback connection
    at java.base/sun.nio.ch.PipeImpl$Initializer.run()
    at java.base/sun.nio.ch.PipeImpl$Initializer.run()
    at java.base/java.security.AccessController.doPrivileged()
    at java.base/sun.nio.ch.PipeImpl.<init>()
    at java.base/sun.nio.ch.SelectorProviderImpl.openPipe()
    at java.base/java.nio.channels.Pipe.open()
    at java.base/sun.nio.ch.WindowsSelectorImpl.<init>()
    at java.base/sun.nio.ch.WindowsSelectorProvider.openSelector()
    at io.netty.channel.nio.NioEventLoop.openSelector()
    ... 23 more
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.base/sun.nio.ch.Net.connect0()
    at java.base/sun.nio.ch.Net.connect()
    at java.base/sun.nio.ch.Net.connect()
    at java.base/sun.nio.ch.SocketChannelImpl.connect()
    at java.base/java.nio.channels.SocketChannel.open()
    at java.base/sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run()
    at java.base/sun.nio.ch.PipeImpl$Initializer.run()
    ... 31 more

-----
JRE 11.0.8+10-b1129.2 amd64 by JetBrains s.r.o.
C:\Program Files\JetBrains\IntelliJ IDEA 203.5251.39\jbr
Java stack trace detected

Or caused by Caused by: java.net.SocketException: Permission denied: connect in last part.

Attachments 4
image1597229693525.png
image1602043645849.png
image1602049769155.png
image1616002697498.png
There is 1 attachment that is not visible to you
Activity settings
Sofya Byzova commented 23 Apr 2020 15:52
2020-04-23 15:31:14,896 | INFO  | ReSharperProcess               | Additional packages: <Packages><Folder Path="C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\plugins\dotCommon\DotFiles"></Folder><Folder Path="C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\plugins\dpa\DotFiles"></Folder><AdHocMetadata BaseDir="C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\plugins\ForTea\dotnet" Version="2020.1.157" BuiltOn="2020-04-16T12:25:19.528Z" CompanyNameHuman="org.jetbrains" SubplatformName="fortea"><PackageFile RelativePath="ForTea.Core.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="ForTea.RiderPlugin.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.TextTemplating.dll" AssemblyName="*"></PackageFile></AdHocMetadata><AdHocMetadata BaseDir="C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\plugins\rider-fsharp\dotnet" Version="2020.1.159" BuiltOn="2020-04-16T12:25:11.345Z" CompanyNameHuman="com.jetbrains.rider" SubplatformName="fsharp"><PackageFile RelativePath="Fantomas.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="FSharp.Compiler.Interactive.Settings.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="FSharp.Compiler.Service.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="FSharp.Core.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="FSharp.Core.xml"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.Common.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.Daemon.Cs.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.ProjectModelBase.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.Psi.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.Psi.Features.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.FSharp.Services.Cs.dll" AssemblyName="*"></PackageFile></AdHocMetadata><AdHocMetadata BaseDir="C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\plugins\rider-unity\dotnet" Version="2020.1.0.161" BuiltOn="2020-04-16T12:25:11.910Z" CompanyNameHuman="com.intellij.resharper" SubplatformName="unity"><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEditor.EditorTestsRunner.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEditor.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.AnimationModule.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.CoreModule.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.Networking.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.PhysicsModule.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.TileModule.xml"></PackageFile><PackageFile RelativePath="Extensions\com.intellij.resharper.unity\annotations\UnityEngine.xml"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.Unity.dll" AssemblyName="*"></PackageFile><PackageFile RelativePath="JetBrains.ReSharper.Plugins.Yaml.dll" AssemblyName="*"></PackageFile></AdHocMetadata></Packages>
2020-04-23 15:31:14,957 | INFO  | ProtocolManager                | Using early-started protocol and process
2020-04-23 15:31:14,957 | INFO  | ProtocolManager                | Create protocol host...
2020-04-23 15:31:15,021 | ERROR | PluginManager                  | java.net.BindException: Address already in use: bind
java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable()
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable()
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run()
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker()
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run()
	at java.base/java.lang.Thread.run()
Caused by: java.net.BindException: Address already in use: bind
	at java.base/sun.nio.ch.Net.bind0()
	at java.base/sun.nio.ch.Net.bind()
	at java.base/sun.nio.ch.Net.bind()
	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind()
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind()
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind()
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind()
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind()
	at io.netty.channel.AbstractChannelHandlerContext.bind()
	at io.netty.channel.DefaultChannelPipeline.bind()
	at io.netty.channel.AbstractChannel.bind()
	at io.netty.bootstrap.AbstractBootstrap$2.run()
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute()
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks()
	at io.netty.channel.nio.NioEventLoop.run()
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run()
	at io.netty.util.internal.ThreadExecutorMap$2.run()
	at io.netty.util.concurrent.FastThreadLocalRunnable.run()
	... 1 more
2020-04-23 15:31:15,025 | ERROR | PluginManager                  | JetBrains Rider 2020.1.0  Build #RD-201.6668.197
2020-04-23 15:31:15,025 | ERROR | PluginManager                  | JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-04-23 15:31:15,025 | ERROR | PluginManager                  | OS: Windows 10
2020-04-23 15:31:15,033 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,034 | WARN  | RiderApplicationLoadListener   | [STDERR] Start Failed: Internal error. Please refer to http://jb.gg/ide/critical-startup-errors
2020-04-23 15:31:15,035 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,035 | WARN  | RiderApplicationLoadListener   | [STDERR] java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.lang.Thread.run(Thread.java:834)
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] Caused by: java.net.BindException: Address already in use: bind
2020-04-23 15:31:15,036 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/sun.nio.ch.Net.bind0(Native Method)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/sun.nio.ch.Net.bind(Net.java:455)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/sun.nio.ch.Net.bind(Net.java:447)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
2020-04-23 15:31:15,037 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
2020-04-23 15:31:15,038 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
2020-04-23 15:31:15,038 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
2020-04-23 15:31:15,038 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
2020-04-23 15:31:15,038 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
2020-04-23 15:31:15,038 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
2020-04-23 15:31:15,039 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
2020-04-23 15:31:15,039 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
2020-04-23 15:31:15,039 | WARN  | RiderApplicationLoadListener   | [STDERR] 	... 1 more
2020-04-23 15:31:15,039 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,040 | WARN  | RiderApplicationLoadListener   | [STDERR] -----
2020-04-23 15:31:15,040 | WARN  | RiderApplicationLoadListener   | [STDERR] JRE 11.0.6+8-b765.25 amd64 by JetBrains s.r.o
2020-04-23 15:31:15,040 | WARN  | RiderApplicationLoadListener   | [STDERR] C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\jbr
2020-04-23 15:31:15,086 | INFO  | PagedFileStorage               | lower=100; upper=500; buffer=10; max=1430
2020-04-23 15:31:15,107 | INFO  | FileChannelUtil                | un-interruptible FileChannel-s will be used for indexes
2020-04-23 15:31:15,134 | INFO  | CertificateManager             | Default SSL context initialized
2020-04-23 15:31:15,152 | INFO  | RegistryManager                | Registry values changed by user: debugger.new.debug.tool.window.view = true, ide.borderless.title.classpath = false, ide.borderless.title.debug = true, ide.borderless.title.product = false, ide.borderless.title.project.path = false, ide.require.transaction.for.model.changes = false, ide.svg.icon = true, ide.title.debug = true, ide.tooltip.initialDelay = 0, ide.tooltip.initialDelay.highlighter = 0, ide.tooltip.showAllSeverities = true, ide.tree.horizontal.default.autoscrolling = false, ide.win.file.chooser.native = true, ide.win.frame.decoration = true, parameter.info.max.visible.rows = 10, performance.watcher.sampling.interval.ms = 200, performance.watcher.unresponsive.interval.ms = 1000, search.everywhere.pattern.checking = false, search.everywhere.settings = true, show.diff.preview.as.editor.tab = true, show.diff.preview.as.editor.tab.with.single.click = true, vcs.log.show.diff.preview.as.editor.tab = true
2020-04-23 15:31:15,406 | INFO  | UISettings                     | Loaded: fontSize=13, fontScale=1.0; restored: fontSize=13, fontScale=1.0
2020-04-23 15:31:15,905 | ERROR | PluginManager                  | null
java.lang.NullPointerException
	at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize()
	at java.desktop/javax.swing.JComponent.getPreferredSize()
	at java.desktop/javax.swing.JEditorPane.getPreferredSize()
	at java.desktop/javax.swing.ScrollPaneLayout.layoutContainer()
	at java.desktop/java.awt.Container.layout()
	at java.desktop/java.awt.Container.doLayout()
	at java.desktop/java.awt.Container.validateTree()
	at java.desktop/java.awt.Container.validate()
	at java.desktop/javax.swing.RepaintManager$3.run()
	at java.desktop/javax.swing.RepaintManager$3.run()
	at java.base/java.security.AccessController.doPrivileged()
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege()
	at java.desktop/javax.swing.RepaintManager.validateInvalidComponents()
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run()
	at java.desktop/java.awt.event.InvocationEvent.dispatch()
	at java.desktop/java.awt.EventQueue.dispatchEventImpl()
	at java.desktop/java.awt.EventQueue$4.run()
	at java.desktop/java.awt.EventQueue$4.run()
	at java.base/java.security.AccessController.doPrivileged()
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege()
	at java.desktop/java.awt.EventQueue.dispatchEvent()
	at com.intellij.ide.IdeEventQueue.dispatchEvent()
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters()
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter()
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter()
	at java.desktop/java.awt.WaitDispatchSupport$2.run()
	at java.desktop/java.awt.event.InvocationEvent.dispatch()
	at java.desktop/java.awt.EventQueue.dispatchEventImpl()
	at java.desktop/java.awt.EventQueue$4.run()
	at java.desktop/java.awt.EventQueue$4.run()
	at java.base/java.security.AccessController.doPrivileged()
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege()
	at java.desktop/java.awt.EventQueue.dispatchEvent()
	at com.intellij.ide.IdeEventQueue.dispatchEvent()
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters()
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter()
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy()
	at java.desktop/java.awt.EventDispatchThread.pumpEvents()
	at java.desktop/java.awt.EventDispatchThread.pumpEvents()
	at java.desktop/java.awt.EventDispatchThread.run()
2020-04-23 15:31:15,908 | ERROR | PluginManager                  | JetBrains Rider 2020.1.0  Build #RD-201.6668.197
2020-04-23 15:31:15,908 | ERROR | PluginManager                  | JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-04-23 15:31:15,908 | ERROR | PluginManager                  | OS: Windows 10
2020-04-23 15:31:15,910 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] Start Failed: Internal error. Please refer to http://jb.gg/ide/critical-startup-errors
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] java.lang.NullPointerException
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:933)
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1683)
2020-04-23 15:31:15,911 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.Container.layout(Container.java:1537)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.Container.doLayout(Container.java:1526)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.Container.validateTree(Container.java:1722)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.Container.validate(Container.java:1657)
2020-04-23 15:31:15,912 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:748)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:746)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.AccessController.doPrivileged(Native Method)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:745)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1900)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
2020-04-23 15:31:15,913 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.AccessController.doPrivileged(Native Method)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:416)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
2020-04-23 15:31:15,914 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.AccessController.doPrivileged(Native Method)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:416)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
2020-04-23 15:31:15,915 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] 	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] 
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] -----
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] JRE 11.0.6+8-b765.25 amd64 by JetBrains s.r.o
2020-04-23 15:31:15,916 | WARN  | RiderApplicationLoadListener   | [STDERR] C:\Users\yatwi\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\201.6668.197\jbr
2020-04-23 15:31:15,955 | ERROR | ComponentStoreImpl             | Cannot init LafManager component state [Plugin: com.intellij]
com.intellij.diagnostic.PluginException: Cannot init LafManager component state [Plugin: com.intellij]
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent()
	at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent()
	at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer()
	at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default()
	at com.intellij.serviceContainer.ComponentManagerImpl.getComponent()
	at com.intellij.ide.ui.LafManager.getInstance()
	at com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl.loadSchemesFromThemes()
	at com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl.<init>()
	at com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl.<init>()
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0()
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance()
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance()
	at java.base/java.lang.reflect.Constructor.newInstance()
	at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer()
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection()
	at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize()
	at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance()
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default()
	at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$future$1.run()
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run()
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun()
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200()
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute()
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run()
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker()
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run()
	at java.base/java.lang.Thread.run()
Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@5be184a
Current thread: Thread[ApplicationImpl pooled thread 3,4,Idea Thread Group] 1002005960
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 1059998981
	at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread()
	at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread()
	at com.intellij.ide.IdeEventQueue.lambda$new$3()
	at java.desktop/java.beans.PropertyChangeSupport.fire()
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange()
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange()
	at java.desktop/java.awt.KeyboardFocusManager.firePropertyChange()
	at java.desktop/java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner()
	at java.desktop/java.awt.Component.removeNotify()
	at java.desktop/java.awt.Container.removeNotify()
	at java.desktop/javax.swing.JComponent.removeNotify()
	at java.desktop/javax.swing.AbstractButton.removeNotify()
	at java.desktop/javax.swing.JButton.removeNotify()
	at java.desktop/java.awt.Container.removeNotify()
	at java.desktop/javax.swing.JComponent.removeNotify()
	at java.desktop/java.awt.Container.removeAll()
	at java.desktop/javax.swing.plaf.basic.BasicOptionPaneUI.uninstallComponents()
	at java.desktop/javax.swing.plaf.basic.BasicOptionPaneUI.uninstallUI()
	at java.desktop/javax.swing.JComponent.uninstallUIAndProperties()
	at java.desktop/javax.swing.JComponent.setUI()
	at java.desktop/javax.swing.JOptionPane.setUI()
	at java.desktop/javax.swing.JOptionPane.updateUI()
	at com.intellij.util.IJSwingUtilities.updateComponentTreeUI()
	at com.intellij.ide.ui.laf.LafManagerImpl.updateUI()
	at com.intellij.ide.ui.laf.LafManagerImpl.updateUI()
	at com.intellij.ide.ui.laf.LafManagerImpl.initializeComponent()
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent()
	... 31 more
2020-04-23 15:31:15,957 | ERROR | ComponentStoreImpl             | JetBrains Rider 2020.1.0  Build #RD-201.6668.197
2020-04-23 15:31:15,957 | ERROR | ComponentStoreImpl             | JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-04-23 15:31:15,957 | ERROR | ComponentStoreImpl             | OS: Windows 10
2020-04-23 15:31:15,999 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,011 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,055 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,057 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,060 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,063 | INFO  | UISettings                     | Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2020-04-23 15:31:16,900 | INFO  | FileBasedIndexDataInitialization | Initialization done: 1554
2020-04-23 15:31:16,961 | INFO  | RiderApplicationLoadListener   | [STDOUT] Debug | Server                    | 33:EarlyStartServerWire | EarlyStartServerWire : connected 
2020-04-23 15:31:16,965 | INFO  | RiderApplicationLoadListener   | [STDOUT] Debug | ByteBufferAsyncProcessor  | 33:EarlyStartServerWire | RESUME :: {id = EarlyStartServerWire/Sender, state = 'AsyncProcessing'} 
2020-04-23 15:31:17,367 | INFO  | StubIndexImpl$StubIndexInitialization | Initialization done: 467
2020-04-23 15:35:28,310 | INFO  | FileBasedIndexImpl             | START INDEX SHUTDOWN
2020-04-23 15:35:28,345 | INFO  | StubIndexImpl                  | StubIndexExtension-s were unloaded
2020-04-23 15:35:28,347 | INFO  | FileBasedIndexImpl             | END INDEX SHUTDOWN
2020-04-23 15:35:28,352 | INFO  | SerializationManagerImpl       | START StubSerializationManager SHUTDOWN
2020-04-23 15:35:28,352 | INFO  | SerializationManagerImpl       | END StubSerializationManager SHUTDOWN
2020-04-23 15:35:28,353 | INFO  | PersistentFS                   | VFS dispose started
2020-04-23 15:35:28,355 | INFO  | PersistentFS                   | VFS dispose completed
2020-04-23 15:35:28,355 | INFO  | Main                           | ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------

Java stack trace detected
Yaroslav Bedrov commented 27 Apr 2020 20:53

@Sofia.Byzova To lock folders IDE is starting a server on localhost, it tries to bind on the first available port between 6942 and 6991, this exception is thrown if IDE was not able to bind on any of the ports in this range. All 50 ports are unlikely to be already used on a machine, so it appears to be a networking issue or some security software which doesn't permit IDE to bind on any port in this range even on localhost interface.

You can check with TcpView if these ports are already taken: https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview . It will show the process using the ports.

But in case of the firewall it can just block the bind operation and TcpView will not show anything.

netsh winsock reset followed by the reboot usually helps.

Serge Baranov commented 14 May 2020 23:20

We have a lot of similar reports, some of them are related to Hyper-V reserving the huge range of ports: https://intellij-support.jetbrains.com/hc/en-us/articles/360007568559?page=1#comment_360001282960 .

C:\Users\alxx>netsh interface ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port End Port
---------- --------
1030 1129
1130 1229
1264 1363
1364 1463
1548 1647
1684 1783
1802 1901
1902 2001
2002 2101
2180 2279
2280 2379
2380 2479
2488 2587
2588 2687
2688 2787
2788 2887
2888 2987
2988 3087
3088 3187
3188 3287
3288 3387
3388 3487
3488 3587
3997 4096
4097 4196
4197 4296
4297 4396
4397 4496
4497 4596
4606 4705
4706 4805
4806 4905
4906 5005
5357 5357
5658 5757
5758 5857
5858 5957
5958 6057
6058 6157
6158 6257
6258 6357
28385 28385
50000 50059 *

* - Administered port exclusions.
C# detected

Suggested solutions:

  • increase the default range (current one is from 6942 to 6991)
  • add another range with higher port numbers if the default range fails
  • fall back to platform specific locking (Mutex on Windows, Sockets on Unix)
  • on Windows ensure that the port we want to use is not in the list of excluded ranges netsh interface ipv4 show excludedportrange protocol=tcp. We can do it only if default range fails to not waste time on checking in other cases.
  • any other suggestions?
Serge Baranov commented 14 May 2020 23:22

Related posts:

After installing this update, applications may not be able to reserve or bind to ports that previously worked.
To resolve this issue, use the following workaround.
Check if the port you want to bind to or reserve is already reserved on the container host. For example, you can use netsh as follows:
netsh interface ipv4 show excludedportrange protocol=tcp
If the port is not reserved, you may use it. If it is reserved, choose a different port.

Phillip Stromberg commented 11 Aug 2020 14:48

Would it be problematic to just bind to a different address in the 127.0.0.0/8 loopback range?
Line 87 of BuiltInServer.kt calls InetAddress.getLoopbackAddress() which always returns IPv4 127.0.0.1 or the IPv6 ::1.
Could it not just be set to always use some other address consistently like 127.88.88.88 where it's unlikely any other program would be bound to those 50 ports on that exact address?

Serge Baranov commented 11 Aug 2020 19:16

it won't help when these ports are reserved by the OS and reported in netsh interface ipv4 show excludedportrange protocol=tcp output. As you can see, it's not interface specific.

Sergey Bulgakov commented 12 Aug 2020 13:04

So I've just got it again. TcpView shows that those ports are free.

I've opened the firewall and see the following picture:

I haven't set anything up specially but I see some connections of IDEA are blocked. Why?.. Even after manually unlocking them, the issue still persists...

image1597229693525.png
Serge Baranov commented 12 Aug 2020 13:09

What's the output from netsh interface ipv4 show excludedportrange protocol=tcp command?

Sergey Bulgakov commented 12 Aug 2020 13:14
Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
      1876        1975
      1976        2075
      2076        2175
      2869        2869
      3288        3387
      3390        3489
      3490        3589
      4449        4548
      4549        4648
      4649        4748
      4749        4848
      4849        4948
      5357        5357
      6687        6786
      6787        6886
      6887        6986
      6987        7086
      7087        7186
      8486        8585
      8586        8685
      8686        8785
     12868       12967
     12968       13067
     13168       13267
     13268       13367
     13368       13467
     13568       13667
     50000       50059     *

* - Administered port exclusions.
C/C++ detected

Blocked by the OS? Oh...

Serge Baranov commented 12 Aug 2020 13:28

Yes, reserved by the OS. See the WORKAROUND section in the issue description.

lukaszzenko commented 15 Aug 2020 09:49

The same issue happens on Linux if loopback interface is misconfigured (in my case 127.0.0.1 was not assigned to loopback for some reason). Restarting lo interface solved the issue for me (sudo ifconfig lo down, sudo ifconfig lo up)

Rostislav Krasny commented 22 Aug 2020 14:57

Hi JetBrains developers. Do you use those TCP connections through the loopback/localhost (127.0.0.1) for the inter process communication (IPC) between the locally running IntelliJ modules? There are several bug reports like this and all of them seem to be triggered by conflicts with firewalls or VPNs widely used these days. Did you consider some other IPC implementation that doesn't depend and doesn't conflict with any firewall or VPN? For example:

  1. UNIX domain socket
  2. Named pipe
  3. Shared memory file

The UNIX domain socket is natively supported even in Windows, from Windows 10 Version 1803.
https://bsmadhu.wordpress.com/2018/08/22/unix-domain-socket-support-in-windows/
https://unwcf.com/posts/unix-sockets/
There is an ongoing and partially done development of supporting UNIX domain socket in Java. It's called JEP-380
https://openjdk.java.net/jeps/380
https://bugs.openjdk.java.net/browse/JDK-8238588

Java can read named pipe but can't create it without using JNI or JNA:
https://cdimascio.wordpress.com/2014/01/11/named-pipes-with-java/

For shared memory file you can write your own library based on the java.nio.MappedByteBuffer class or use a library like Mappedbus:
https://github.com/caplogic/mappedbus

Joa Ebert commented 26 Aug 2020 10:53

FYI I was running into the same issue. netsh winsock reset as well as shutting down any HyperV VM followed by a reboot solved the issue for me.

Quentin Suckling commented 7 Oct 2020 06:12

Hi,

I'm looking to change over to Rider from VS but I can't get it to open at all.
Crashes on startup with the exception above.

I've tried all the workarounds suggested but nothing works.

It's a fresh install of Rider 2020.2.

Not running Hyper-V.
Attached the output of "netsh interface ipv4 show excludedportrange protocol=tcp"

I've been looking to change to Rider for about a year now but every time I install a new version I get this error.

Any help would be appreciated.

Thanks,
Quentin.

image1602043645849.png
Serge Baranov commented 7 Oct 2020 07:12

you have the required range reserved by the system: 6905 - 7004 according to the provided screenshot. Not sure which app/service is adding this range to the excluded ports, but this command when you run it from Administrator is supposed to reset the excluded ports: netsh int ipv4 set dynamicport tcp start=49152 num=16383.

Quentin Suckling commented 7 Oct 2020 07:49

I did try running both those netsh commands but it didn't make any difference.
Do I need to do anything else after run them and before I start Rider?

image1602049769155.png
Serge Baranov commented 7 Oct 2020 08:45

For some reason these commands do not remove 6905 - 7004 excluded range for you. No ideas why it doesn't work on this specific system, sorry.

Grahame White commented 21 Oct 2020 14:54

I'm also seeing this issue and unfortunately the work around is not allowing me to start either IntelliJ or PyCharm.

Egor Okhterov commented 22 Oct 2020 09:00

I could start GoLand 2020.2.3 yesterday on Windows10, but today it's having this issue.
Workaround doesn't help.

Nick commented 28 Oct 2020 20:11

I have the same issue with all the jetbrains products, they work if I reboot my computer

Chehui Chou commented 4 Nov 2020 18:06

Since the IDE will bind to port 6942 to 6991, this solution that reserves ports before Hyper-V works for me: https://stackoverflow.com/a/54727281/3689736

Mihail Duchev commented 9 Nov 2020 14:44

I'm having the same issue. The workaround seems to be working for now.

Serge Baranov commented 21 Jan 2021 20:22
Vladimir Turov commented 3 Feb 2021 20:23

The same happened for me, the workaround is still working. I am using WSL2 a lot. A lot of ports below 10000 were affected by this (like a third) for me including huge 7800-8300 range which stopped a lot of apps from working, not only IDEA-like ones.

Nalla Vyshnavi commented 17 Mar 2021 18:39

who to solve this error pls reterfie my problem i am trying from since more than 3 months pls solve this problem

image1616002697498.png
Serge Baranov commented 17 Mar 2021 18:49

please contact support at https://intellij-support.jetbrains.com/hc/requests/new with the logs folder attached (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085). See if reinstalling PyCharm from https://www.jetbrains.com/pycharm/download/index.html helps. Your problem doesn't seem to be related to this specific ticket.

Aron Water commented 20 Mar 2021 09:24

it works. net stop winnat net start winnat

MARTIN PEREZ RUIZ commented 29 Mar 2021 02:09

It was just what I needed to resolve that problem. Thanks!!!

Halfdan Ingvarsson commented 15 Jun 2021 05:59

I hit this with Rider and found that adding -Djava.net.preferIPv4Stack=true to the VM options allows it to start properly with VPN enabled.

Jose Humberto Oliveros Magaña commented 23 Jun 2021 17:04

Workaround sometimes works for me, sometimes doesn't; granted I do use a likely troublesome combo:

  • Corporate VPN
  • WSL2
  • Hyper-V
  • Corporate-managed security solution (firewall is almost impossible to configure unless you have extensive paperwork)

In the end, binding to a port for file / resource locking is not recommended, the solution is to use platform-specific mechanisms.

Davide Maggio commented 29 Jul 2021 21:22

Updated to 2021.2 and alert dialog is gone. I had to manually run idea.bat to get something to read and ""debug""

Aleksei Lebedev commented 10 Sep 2021 13:40

The most terrible thing PHPStrom (2021.2.1) doesn't show any message just a splash screen with a dead progress bar. I spent half of hour to find why…

David Cleland commented 15 Sep 2021 21:56

I just hit this as well and the lack of alert dialog in 2021.2.1 seems like a regression. I had to go back to 2021.1.3 to realise what was wrong.

The
net stop winnat
net start winnat
solution fixed this for me.

I had never had this problem until today, even thought I have Hyper-V active. I wonder if this issue has got worse since this weeks updates from Microsoft, which I applied yesterday. I have a X-Server program, X410, which fails to start with similar symptoms and it was also fixed by stop/starting winnat.

Siebe Krijgsman commented 24 Dec 2021 10:35

Having the same problem with IntelliJ, PyCharm, and CLion. Clearing the ports works, but that's just a temporary workaround.

Thomas Weidman commented 20 Jan 2022 17:39

This issue also happens during installation of tools not just starting. When the tools attempt to "update plugins" after their installation they fail to finish.

Ian Kemp commented 22 Feb 2022 15:33

That this is not fixed after almost two years is bad, that the IDE gives zero indication that there's a critical problem is far worse. Do you understand how to do basic exception handling, JetBrains?

I guess it doesn't matter since there is zero chance of me buying Rider after such a poor first-use experience. After using Visual Studio exclusively since .NET Framework 1.0, I was thinking it would be impossible for any would-be competitor to be worse - but you've not only proved me wrong, you've failed at the very first step - so congratulations on being terrible!

Bouke Versteegh commented 24 Feb 2022 14:24

Understandably you're frustrated for not being able to use Rider. However, basing your conclusions entirely on this initial bad experience, I'm afraid you've misjudged Jetbrains. Their products are really great. Not perfect, no, but when working for some time with their IDEs you will see that they really care about developer experience, and they have improved my daily life like no other software. I wish more companies would take example from Jetbrains.

The above issue has also affected me, hence I'm following it. However, I applied the workaround which worked, and was able to continue my work.

Rider may actually be a good alternative to VS for you, once you get it running, so it would be a lost opportunity for yourself to burn it so quickly.
Do reconsider, and if you have any issues applying the workaround please write again, but without the snarks. I'm sure someone will be able to help.

James Thomas Moon commented 10 Mar 2022 22:25

If you're looking to analyze the log file then these commands may help:

PS > Clear-Content $env:LOCALAPPDATA\\JetBrains\\PyCharm*\\log\\idea.log
PS > Get-Content -Tail 100 -Wait -Path $env:LOCALAPPDATA\\JetBrains\\PyCharm*\\log\\idea.log
powershell (highlighting unavailable)

from duplicate IDEA-286661 .

Henk Poley commented 11 Mar 2022 10:48

Maybe just like the one-click virusscanner directory exclusion, JetBrains could add a button that does `netsh int ipv4 add excludedportrange protocol=tcp startport=<portnr> numberofports=1` on the ports it requires. If it's a range it needs, you can increase the `numberofports=`.

Shilong Sun commented 5 Aug 2022 08:22

People! If you are a Unity developer using Rider on Windows 10. DONT SET YOUR PORT TO start=49152 num=16383. It will break your unity debugger. Set the range to "start=32768 num=32767" instead. This costs me 6 hours to figure out.

2
CC Wang commented 25 Aug 2022 09:01
netsh int ipv4 add excludedportrange protocol=tcp startport=6942 numberofports=50
C/C++ detected

worked for me

Sergey Zolotarev commented 9 Sep 2022 14:12

Can anybody explain where the number 49152 comes from?

Serge Baranov commented 9 Sep 2022 18:29

https://docs.microsoft.com/en-US/troubleshoot/windows-server/networking/default-dynamic-port-range-tcpip-chang

To comply with Internet Assigned Numbers Authority (IANA) recommendations, Microsoft has increased the dynamic client port range for outgoing connections in Windows Vista and Windows Server 2008. The new default start port is 49152, and the new default end port is 65535. This is a change from the configuration of earlier versions of Windows that used a default port range of 1025 through 5000.

The suggested command resets the dynamic client ports range to the IANA recommendations.

Aleksandr Frolov commented 26 Oct 2022 19:29

Hello to everyone in this "chat", lemme join the waiting list.

So... it's been 2.5 years since this bug was open? I guess we'll need to wait another 7 or so years until it resolved if ever (as per experience with infamous rsync bug). The fact that they have a link to blog post with startup errors embedded in a stack trace in error window suggest that there is no hope for seeing it solved in a near future (if ever, since link is already there).

Oh, right. jetbrains, I have an amazing idea for you. Check stack trace for specific errors (as per blog post) and just display workaround in the same window with bold font. Then you will be able to resolve this and other startup issues. Easy-peasy.

Project IntelliJ IDEA
Priority Critical C
Type Usability Problem
State Open O
Assignee Roman Shevchenko
Subsystem Core
Affected versions Not specified
Included in builds Not specified
Latest Affected Not specified